using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Text;
using DuMez.DAL;

public class EgitimDurum : IDisposable
{
    #region Fields

    private int _EgitimId;
    private string _OkulAdı;
    private string _EgitimAlani;
    private string _BasTar;
    private string _BitTar;
    private string _EkNot;
    private int _MezunId;

    #endregion Fields

    #region Properties

    public int EgitimId
    {
        get { return _EgitimId; }
        set { _EgitimId = value; }
    }

    public string OkulAdı
    {
        get { return _OkulAdı; }
        set { _OkulAdı = value; }
    }

    public string EgitimAlani
    {
        get { return _EgitimAlani; }
        set { _EgitimAlani = value; }
    }

    public string BasTar
    {
        get { return _BasTar; }
        set { _BasTar = value; }
    }

    public string BitTar
    {
        get { return _BitTar; }
        set { _BitTar = value; }
    }

    public string EkNot
    {
        get { return _EkNot; }
        set { _EkNot = value; }
    }


    public int MezunId
    {
        get { return _MezunId; }
        set { _MezunId = value; }
    }
    #endregion

    #region Constructor

    public EgitimDurum()
    {

    }
    #endregion

    #region IDisposable Members
    public void Dispose()
    {

    }
    #endregion

    #region Methods

    public bool EgitimBilgisiEkle(int MezunID, EgitimDurum ed)
    {
        return SqlUtility.ExecuteNonQuery("dbo.DUMEZ_EGITIM_BILGISI_EKLE '" + ed.OkulAdı + "','" + ed.EgitimAlani + "','" + ed.BasTar.ToString().Trim() + "','" + ed.BitTar.ToString().Trim() + "','" + ed.EkNot + "'," + MezunID + "");
    }

    public bool EgitimBilgisiSil(int EgitimID)
    {
        return SqlUtility.ExecuteNonQuery("dbo.DUMEZ_EGITIM_BILGISI_SIL " + EgitimID + "");
    }

    public bool EgitimBilgisiGuncelle(EgitimDurum ed)
    {
        return SqlUtility.ExecuteNonQuery("dbo.DUMEZ_EGITIM_BILGISI_GUNCELLE '" + ed.OkulAdı + "','" + ed.EgitimAlani + "','" + ed.BasTar.ToString().Trim() + "','" + ed.BitTar.ToString().Trim() + "','" + ed.EkNot + "'," + ed.EgitimId + "");
    }

    public DataTable EgitimBilgisiKisiyeGoreGetir(int MezunID)
    {
        return SqlUtility.ExecuteDataTable("dbo.DUMEZ_EGITIM_BILGISI_SPECIFIC_SELECT " + MezunID + "");
    }


    #endregion
}
